﻿using Domain.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Domain.Model.Domain_MoBan_Model;

namespace Domain.Interface
{
    public interface IMoBan : IDependency
    {
        #region 工作计划 
        void AddGongZuoJiHua(string str);
        void UpdateGongZuoJiHua(string str);
        string GetGongZuoJiHuas();
        string GetGongZuoJiHua(int mbid);
        #endregion

        #region 绩效考核
        void AddJiXiao(string str);
        void UpdateJiXiao(string str);
        string GetJiXiaos();
        string GetJiXiao(int mbid);
        #endregion
        void DelMoBan(int mbid, int mblx);
        #region 考核范围
        string GetMoBanKaoHeFanWei(int nrid, string username);

        /// <summary>
        /// 添加考核范围_科室
        /// </summary>
        /// <param name="nrid"></param>
        /// <param name="zwid"></param>
        /// <param name="username"></param>
        void AddKaoHeFanWeiZhiWu(int nrid, int zwid, string username);
        /// <summary>
        /// 删除考核范围_科室
        /// </summary>
        /// <param name="nrid"></param>
        /// <param name="zwids"></param>
        /// <param name="username"></param>
        void DelKaoHeFanWeiKeShi(int nrid, string zwids, string username);

        string GetMoBanKaoHeFanWeiRenYuan(int nrid, string username);
        /// <summary>
        /// 添加考核范围_人员
        /// </summary>
        /// <param name="nrid"></param>
        /// <param name="ry"></param>
        /// <param name="username"></param>
        void AddKaoHeFanWeiRenYuan(int nrid, string ry, string username);
        /// <summary>
        /// 删除考核范围_人员
        /// </summary>
        /// <param name="nrid"></param>
        /// <param name="rys"></param>
        /// <param name="username"></param>
        void DelKaoHeFanWeiRenYuan(int nrid, string rys, string username);

        #endregion

        #region 工作追溯

        string GetZhuiSu(string username, int mkhbid, int oneid, int twoid);

        #endregion

        #region 新模板
        /// <summary>
        /// 获取控件html
        /// </summary>
        /// <param name="mobancontentid"></param>
        /// <returns></returns>
        string GetMoBanControl(int mobanpathid);
        /// <summary>
        /// 获取所有控件
        /// </summary>
        /// <returns></returns>
        string GetControlAll();
        /// <summary>
        /// 添加Answer
        /// </summary>
        /// <param name="mobancontentid"></param>
        /// <param name="answer"></param>
        int AddMoBanAnswer(int mbid, int ljid, int mobancontentid, string answer);
        /// <summary>
        /// 更新Answer
        /// </summary>
        /// <param name="mobancontentid"></param>
        /// <param name="answer"></param>
        void UpdateMoBanAnswer(int mbid, int ljid, int mobancontentid, string answer);
        /// <summary>
        /// 删除Answer
        /// </summary>
        /// <param name="answerid"></param>
        void DeleteMoBanAnswer(int mbid, int ljid, int nrid, int answerid);
        /// <summary>
        /// 创建模板
        /// </summary>
        /// <param name="name"></param>
        /// <param name="cjrid"></param>
        /// <param name="mbtype"></param>
        void AddMoBan(string name, string cjrid, int mbtype);
        /// <summary>
        /// 修改模板
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="name"></param>
        void UpdateMoBan(int mbid, string name);
        /// <summary>
        /// 删除模板
        /// </summary>
        /// <param name="mbid"></param>
        void DelMoBan(int mbid);
        /// <summary>
        /// 获取所有模板
        /// </summary>
        /// <returns></returns>
        List<Domain_MoBan_Main> GetAllMoBan();

        /// <summary>
        /// 获取除指定ID以外的考核表
        /// </summary>
        /// <param name="mbid">指定ID</param>
        /// <param name="keyword">关键字</param>
        /// <returns></returns>
        string GetExceptMySelfMoBan(int mbid, string keyword);
        /// <summary>
        /// 获取模板详细
        /// </summary>
        /// <param name="mbid"></param>
        /// <returns></returns>
        string GetMoBanInfo(int mbid);
        /// <summary>
        /// 添加模板路径
        /// </summary>
        /// <param name="mbid">模板ID</param>
        /// <param name="sx">顺序</param>
        /// <param name="name">名称</param>
        /// <param name="pid">上级ID</param>
        /// <param name="fenzhi">分值</param>
        /// <param name="isedit">生成考核表时是否可以编辑</param>
        /// <param name="controlid">包含的内容默认使用的控件ID</param>
        /// <param name="isinclude">是否包含子表</param>
        /// <param name="sonmobanid">子表ID</param>
        int AddMoBanPath(int mbid, int sx, string name, int pid, decimal fenzhi, bool isedit, int controlid, bool isinclude, int sonmobanid = 0);
        string GetSearchMoBanList(string keyword);

        /// <summary>
        /// 修改模板路径
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="pathid"></param>
        /// <param name="sx"></param>
        /// <param name="name"></param>
        /// <param name="fenzhi"></param>
        /// <param name="isedit"></param>
        /// <param name="controlid"></param>
        /// <param name="isinclude"></param>
        /// <param name="sonmobanid"></param>
        void UpdateMoBanPath(int mbid, int pathid, int sx, string name, decimal fenzhi, bool isedit, int controlid,
            bool isinclude, int sonmobanid = 0);
        /// <summary>
        /// 删除模板路径
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="pathid"></param>
        void DelMoBanPath(int mbid, int pathid);
        /// <summary>
        /// 添加模板内容
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="pathid"></param>
        /// <param name="sx"></param>
        /// <param name="contents"></param>
        /// <param name="fenzhi"></param>
        /// <param name="controlid"></param>
        int AddMoBanContent(int mbid, int pathid, int sx, string contents, decimal fenzhi, int controlid);
        /// <summary>
        /// 修改模板内容
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="contentid"></param>
        /// <param name="sx"></param>
        /// <param name="contents"></param>
        /// <param name="fenzhi"></param>
        /// <param name="controlid"></param>
        void UpdateMoBanContent(int mbid, int ljid, int contentid, int sx, string contents, decimal fenzhi, int controlid);
        /// <summary>
        /// 删除模板内容
        /// </summary>
        /// <param name="mbid"></param>
        /// <param name="contentid"></param>
        void DelMoBanContent(int mbid, int ljid, int contentid);
        string GetMoBanType();

        #endregion

        #region 考核范围
        /// <summary>
        /// 获取考核范围集
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        string GetKaoHeFanWeis(string name);
        /// <summary>
        /// 获取考核范围详细信息
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <returns></returns>
        string GetKaoHeFanWei(int khfwryid);
        /// <summary>
        /// 添加考核范围
        /// </summary>
        /// <param name="userinfoid">考核人id</param>
        /// <returns></returns>
        int AddKaoHeFanWei(string userinfoid);
        /// <summary>
        /// 添加考核内容
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <param name="ljid"></param>
        void AddKaoHePath(int khfwryid, int ljid);
        /// <summary>
        /// 删除考核内容
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <param name="ljid"></param>
        void DelKaoHePath(int khfwryid, int nrid);
        /// <summary>
        /// 添加被考核人员
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <param name="userid"></param>
        void AddBeiKaoHeJiaoZhiGong(int khfwryid, string userid);
        /// <summary>
        /// 添加被考核科室
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <param name="ksid"></param>
        void AddBeiKaoHeJiaoZhiGong(int khfwryid, int ksid);
        /// <summary>
        /// 删除被考核人员
        /// </summary>
        /// <param name="khfwryid"></param>
        /// <param name="userid"></param>
        void DelBeiKaoHeJiaoZhiGong(int khfwryid, string userid);
        /// <summary>
        /// 删除考核范围
        /// </summary>
        /// <param name="khfwryid"></param>
        void DelKaoHeFanWei(int khfwryid);


        #endregion
    }
}
